package com.dd.cloud.user.service.phar.pharservice;

import com.dd.cloud.user.DTO.CallbackPresStatusReq;
import com.dd.cloud.user.DTO.CancelPresReq;
import com.dd.cloud.user.DTO.CommonParamReq;
import com.dd.cloud.user.entity.doctor.PatientMedCard;
import com.dd.cloud.user.entity.order.OrderPay;
import com.dd.cloud.user.req.pres.PresCreateReq;
import com.dd.cloud.user.req.pres.PresPatientAddrReq;
import com.dd.cloud.user.vo.ExpressRes;
import com.dd.cloud.common.exception.ZekeException;

import java.util.List;

/**
 * @Description: //药房操作 装饰器基类
 * @ClassName: PharDecoratorService
 * @Author: czg
 * @Date: 2023/04/20 14:42
 * @Version: 1.0
 */
public abstract class PharDecoratorService implements PharServiceInterface {
    //被装饰者
    private PharServiceInterface pharServiceInterface;

    public void setPharService(PharServiceInterface pharServiceInterface){
        this.pharServiceInterface = pharServiceInterface;
    }

    /**
     * 发送处方到药房 需要扣减库存
     */
    @Override
    public boolean sendPresToPhar(OrderPay pay) {
        return pharServiceInterface.sendPresToPhar(pay);
    }

    /**
     * 取消处方 需要增加库存
     */
    @Override
    public void cancelPres(CancelPresReq req) {
        pharServiceInterface.cancelPres(req);

    }

    @Override
    public void addPresDetail(PresCreateReq req, PatientMedCard medCard) {
        pharServiceInterface.addPresDetail(req, medCard);
    }

    @Override
    public Object presCallback(CallbackPresStatusReq req) {
        return pharServiceInterface.presCallback(req);
    }

    @Override
    public Object expressCallback(CommonParamReq req) {
        return pharServiceInterface.expressCallback(req);
    }

    @Override
    public void updatePresPatientAddrInfo(PresPatientAddrReq req) {
        pharServiceInterface.updatePresPatientAddrInfo(req);
    }

    @Override
    public List<ExpressRes> queryLogisticsInfo(String tencode) {
        return pharServiceInterface.queryLogisticsInfo(tencode);
    }
}
